<h4>News Feeds</h4>
<div class="panel panel-default" ng-if="!currentUser.authToken">
	<div class="panel-heading">
		Please login to experience this news app.
	</div>
</div>
<div class="panel panel-default" ng-if="currentUser.authToken">
	<div class="panel-heading">
    <div class="btn-group">
			<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
				{{ currentFeed.name }} <span class="caret"></span>
			</button>
			<ul class="dropdown-menu" role="menu">
				<li ng-repeat="feed in feeds">
					<a ng-click="loadFeed(feed)">{{ feed.name }}</a>
				</li>
			</ul>
		</div>
		<div class="pull-right">
		  <button class="btn btn-default" ng-click="loadFeed(currentFeed)">
		  	<span class="glyphicon glyphicon-refresh"></span>
		  </button>
		</div>
  </div>
	<div class="panel-body">
		<accordion close-others="false">
	    <accordion-group ng-repeat="entry in currentFeed.data"
	    	heading="{{ entry.title }}" is-open="true">
      	<span>{{ formatDate(entry.publishedDate) }}:</span>
      	<div ng-bind-html="entry.contentSnippet">
      	</div>
      	<a href="{{ entry.link }}">read more</a>
	    </accordion-group>
	  </accordion>
  </div>
</div>
